package com.zd.manage.controller;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zd.manage.entity.BaseBody;
import com.zd.manage.entity.Person;
import com.zd.manage.error.Code500Exception;
import com.zd.manage.service.PersonService;
@Controller
@RequestMapping("/person")
public class PersonController extends BaseController {
	@Autowired
	PersonService personService;
	
	@RequestMapping(value="/findallperson")
	@ResponseBody
	public BaseBody findAllPerson(){
		 return personService.findAllPerson();
	}
	@RequestMapping(value="/addPerson")
	@ResponseBody
	public BaseBody addPerson(Person person) throws Code500Exception{
		if(1==1){
			throw new Code500Exception("参数错误");
		};
		
		 return personService.findAllPerson();
	}
}
